/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: DcmDsd.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: DCMDSD
*
* Revision:
* --------------------------------------------------------------------------------
* v0.1: 
* --Yueting.Ben, 2024-03-12 
* --Initial release

**********************************************************************************/

/** HEADER FILES **/
#include "DcmDsdCfg.h"
#include "DcmDspSvc10.h"
#include "DcmDspSvc11.h"
#include "DcmDspSvc19.h"
#include "DcmDspSvc22.h"
#include "DcmDspSvc27.h"
#include "DcmDspSvc2E.h"


/** MACRO DEFINITION **/
#define DCM_SVC_SUB_NUM_NULL       0u

/** TYPEDEF DEFINITION **/
#define DCM_SVC_SUB_NULL_CFG ((Dcm_SubSvcCfgType*)NULL_PTR)


/** LOCAL DATA DECLARATION **/
const Dcm_SubSvcCfgType svc10SubFuncCfg[DCM_SVC_SUB_ID_10_MAX];
const Dcm_SubSvcCfgType svc19SubFuncCfg[DCM_SVC_SUB_ID_19_MAX];
const Dcm_SubSvcCfgType svc27SubFuncCfg[DCM_SVC_SUB_ID_27_MAX];

const Dcm_SvcCfgType Dcm_SvcCfg[DCM_SVC_ID_MAX];


/** LOCAL DATA **/
const Dcm_SubSvcCfgType svc10SubFuncCfg[DCM_SVC_SUB_ID_10_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc10_0X_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc10_0X_Processor},
    {0x03, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc10_0X_Processor},
};

const Dcm_SubSvcCfgType svc27SubFuncCfg[DCM_SVC_SUB_ID_27_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_01_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_02_Processor},
    {0x03, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_03_Processor},
    {0x04, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_04_Processor}
};

const Dcm_SubSvcCfgType svc19SubFuncCfg[DCM_SVC_SUB_ID_19_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_01_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_02_Processor},
    {0x04, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_04_Processor},
    {0x06, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_06_Processor},
    {0x0A, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_0A_Processor}
};

const Dcm_SvcCfgType Dcm_SvcCfg[DCM_SVC_ID_MAX] = 
{
    {0x10, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)svc10SubFuncCfg, DCM_NULL_PROCESSOR},  /* DCM_SVC_ID_10 */
    {0x11, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)svc10SubFuncCfg, DCM_NULL_PROCESSOR}, /* DCM_SVC_ID_11 */
    {0x19, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_19_MAX, (Dcm_SubSvcCfgType*)svc19SubFuncCfg, DCM_NULL_PROCESSOR}, /* DCM_SVC_ID_19 */
    {0x22, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_NUM_NULL, DCM_SVC_SUB_NULL_CFG, DcmDsp_Svc22_Processor}, /* DCM_SVC_ID_22 */
    {0x27, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_27_MAX, (Dcm_SubSvcCfgType*)svc27SubFuncCfg, DCM_NULL_PROCESSOR}, /* DCM_SVC_ID_27 */
    {0x2E, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityCfgType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_NUM_NULL, DCM_SVC_SUB_NULL_CFG, DcmDsp_Svc2E_Processor} /* DCM_SVC_ID_22 */
};

